import index from '../../api/index'

const actions = {
  /**
   * 获取文章列表
   * @param state
   * @param commit
   * @param params
   * @returns {Promise<void>}
   */
  async indexDetail({state, commit}, params) {
    let ret = await index.detail(params);

    return ret.data.data;
  },

  async updateIndex({state, commit}, params) {
    return await index.update(params);
  }

};

export default {
  namespaced: true,
  actions
}
